package com.ym.medical.dao;

import com.ym.medical.domain.entity.DoctorDetailsEntity;
import com.ym.medical.domain.param.DoctorDetailsParam;
import com.ym.medical.domain.param.DoctorSearchParam;
import com.ym.medical.domain.param.ExamDoctorParam;
import com.ym.medical.domain.vo.DoctorAuditRecordVo;
import com.ym.medical.domain.vo.DoctorDetailAllInfoVo;
import com.ym.medical.domain.vo.DoctorDetailListVo;
import com.ym.medical.domain.vo.DoctorDetailsVo;
import com.ym.medical.domain.vo.ResultDoctor;
import com.ym.medical.domain.vo.SimpleDoctorInfoVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 医生详情Dao接口
 *
 * @author ym
 * @date 2020-08-19
 */
@Repository
public interface DoctorDetailsDao extends Mapper<DoctorDetailsEntity> {

	/**
	 * 删除医生信息
	 *
	 * @param doctorIds
	 * @return
	 */
	int deleteDoctor(@Param("doctorIds") Long[] doctorIds);

	/**
	 * 医生列表
	 *
	 * @param doctorDetailsModel
	 * @return
	 */
	List<DoctorDetailListVo> getDoctorDetailList(DoctorDetailsParam doctorDetailsModel);

	/**
	 * 医生所有列表
	 * @param  model
	 * @return
	 */
	List<DoctorDetailsEntity> getAllDoctorList(DoctorDetailsParam model);

	/**
	 * 医生根据条件查询
	 *
	 * @param examDoctor
	 * @return
	 */
	List<ResultDoctor> selectByExamDoctor(ExamDoctorParam examDoctor);

	/**
	 * 查询平台的医生
	 *
	 * @param keywords
	 * @return
	 */
	List<ResultDoctor> listPlatformMembers(@Param("keywords") String keywords, @Param("userId") Long userId, @Param("algIdent") String algIdent, @Param("algType") String algType);


	/**
	 * 邀请医生加入工作室,医生列表查询
	 *
	 * @param query
	 * @return
	 */
	List<ResultDoctor> listStudioMembers(DoctorSearchParam query);

	/**
	 * 查询医生个人信息最全
	 *
	 * @param doctorDetailsModel 参数
	 * @return
	 */
	List<DoctorDetailAllInfoVo> listDoctorAllInfo(DoctorDetailsParam doctorDetailsModel);

	/**
	 * 邀请医生加入工作室,医生列表总数
	 *
	 * @param query
	 * @return
	 */
	Long listStudioMembersCount(DoctorSearchParam query);

	/**
	 * 查询医生的简单信息
	 * @param doctorId
	 * @return
	 */
	List<SimpleDoctorInfoVo> selectSimpleDoctorInfo(@Param("doctorId") Long doctorId);

	/**
	 * 医内医生编码是否重复
	 * @param doctId
	 * @param doctCode
	 * @return
	 */
	DoctorDetailsEntity repeatHosCode(@Param("doctId") Long doctId,
								@Param("doctCode") String doctCode);

	/**
	 * 医生添加校验医生编码(安医院)
	 * @param doctCode
	 * @param hosCode
	 * @return
	 */
	DoctorDetailsEntity repeatDoctCode(
			@Param("doctCode") String doctCode,
			@Param("hosCode") String hosCode);

	/**
	 * 医生名下拉搜索
	 * @param hosName
	 * @param doctName
	 * @return
	 */
	List<DoctorDetailsVo> searchDoctName(
			@Param("hosName") String hosName,
			@Param("doctName") String doctName);


	/**
	 * 审核列表
	 *
	 * @param auditRecordVo
	 * @return
	 */
	List<DoctorAuditRecordVo> certRecordList(DoctorAuditRecordVo auditRecordVo);
}
